package day09API.serialize;

import java.io.FileInputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;

/**
 * @author DBX
 * @effect 对象输出流，进行对象的反序列化
 * @date 2021/8/27 0027 - 10:54
 */
public class OISDemo {
    public static void main(String[] args) throws Exception{
        FileInputStream fis = new FileInputStream("./File/user.obj");
        ObjectInputStream ois = new ObjectInputStream(fis);
        User user = (User)ois.readObject();
        System.out.println(user);
        ois.close();
    }
}